package com.nuoniu.sibanyun.entity.production;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 生产领退补料单主表
 * </p>
 *
 * @author 小啊刚
 * @since 2021-02-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ma_picking_return_rep")
@ApiModel(value="VProductionPickReturnMain对象", description="生产领退补料单主表")
public class VProductionPickReturnMain extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "数据来源")
    @TableField("data_source")
    private String dataSource;

    @ApiModelProperty(value = "供应商id")
    @TableField("vendor_id")
    private Integer vendorId;

    @ApiModelProperty(value = "供应商名称")
    @TableField("vendor_name")
    private String vendorName;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    private LocalDate voucherDate;

    @ApiModelProperty(value = "单据编号")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "状态")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据号")
    @TableField("source_voucher_code")
    private String sourceVoucherCode;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "来源单据日期")
    @TableField("source_voucher_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate sourceVoucherDate;

    @ApiModelProperty(value = "类型4:领料5:退料6:补料")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty(value = "单据类型:1普通2:倒冲3:其它")
    @TableField("voucher_type")
    private Integer voucherType;

    @ApiModelProperty(value = "领/退料人id")
    @TableField("pick_user_id")
    private Integer pickUserId;

    @ApiModelProperty(value = "领/退料人名称")
    @TableField("pick_user_name")
    private String pickUserName;

    @ApiModelProperty(value = "审核人id")
    @TableField("reviewer_user_id")
    private Integer reviewerUserId;

    @ApiModelProperty(value = "审核人姓名")
    @TableField("reviewer_user_name")
    private String reviewerUserName;

    @ApiModelProperty(value = "审核日期")
    @TableField("reviewer_date")
    private LocalDateTime reviewerDate;

    @ApiModelProperty(value = "关闭人id")
    @TableField("close_user_id")
    private Integer closeUserId;

    @ApiModelProperty(value = "关闭人姓名")
    @TableField("close_user_name")
    private String closeUserName;

    @ApiModelProperty(value = "关闭日期")
    @TableField("close_date")
    private LocalDateTime closeDate;





    @ApiModelProperty(value = "生产车间id")
    @TableField("office_id")
    private Integer officeId;

    @ApiModelProperty(value = "生产车间名称")
    @TableField("office_name")
    private String officeName;

    @ApiModelProperty(value = "仓库id")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "加工产品id")
    @TableField("product_id")
    private Integer productId;

    @ApiModelProperty(value = "加工产品名称")
    @TableField("product_name")
    private String productName;

    @ApiModelProperty(value = "加工产品编码")
    @TableField("product_code")
    private String productCode;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "创建日期")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人名称")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "提交人ID")
    @TableField("submit_user_id")
    private Integer submitUserId;

    @ApiModelProperty(value = "提交人姓名")
    @TableField("submit_user_name")
    private String submitUserName;

    @ApiModelProperty(value = "提交时间")
    @TableField("submit_date")
    private LocalDateTime submitDate;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人名称")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "修改日期")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "总数量")
    @TableField("total_quantity")
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "累计执行数量")
    @TableField(exist = false)
    private BigDecimal cumExecuteQuantity;

    @ApiModelProperty(value = "明细列表")
    @TableField(exist = false)
    private List<VProductionPickReturnDetail> orderDetailList;
}
